Nested Refinements for Dynamic Languages

نویسندگان

  • Ravi Chugh
  • Patrick M. Rondon
  • Ranjit Jhala
چکیده

Programs written in dynamic languages make heavy use of features— run-time type tests, value-indexed dictionaries, polymorphism,and higher-order functions — that are beyond the reach of type sys-tems that employ either purely syntactic or purely semantic reason-ing. We present a core calculus, System D, that merges these twomodes of reasoning into a single powerful mechanism of nested re-finement types wherein the typing relation is itself a predicate in therefinement logic. System D coordinates SMT-based logical impli-cation and syntactic subtyping to automatically typecheck sophisti-cated dynamic language programs. By coupling nested refinementswith McCarthy’s theory of finite maps, System D can precisely rea-son about the interaction of higher-order functions, polymorphism,and dictionaries. The addition of type predicates to the refinementlogic creates a circularity that leads to unique technical challengesin the metatheory, which we solve with a novel stratification ap-proach that we use to prove the soundness of System D.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Formalizing Simple Refinement Types in Coq An Experience Report

We consider refinement types in which base types can be refined by constraints expressible in some decidable logic. Such refinement types have been applied in many settings, such as certification of security policies [1, 10], and reasoning precisely about heap updates [9, 10]. A lot of work has been done on extensions of the basic idea of refinements, including inference in liquid types [8], or...

متن کامل

Type Refinements in an Open World (Extended Abstract)

A refinement is a predicate on the elements of a type that describes their execution behavior. Much work has gone into developing refinements in a closed world, in which the classes of values of a type are fixed statically, as in the case of the natural numbers with zero and succ. Relatively little work has gone into developing refinements in an open world in which new classes may be added dyna...

متن کامل

Type Refinements in an Open World ( Extended

A refinement is a predicate on the elements of a type that describes their execution behavior. Much work has gone into developing refinements in a closed world, in which the classes of values of a type are fixed statically, as in the case of the natural numbers with zero and succ. Relatively little work has gone into developing refinements in an open world in which new classes may be added dyna...

متن کامل

Type Refinements for Compiler Correctness

Type refinements, introduced by Freeman and Pfenning and explored by Davies and Dunfield, unify the ontological and epistemic views of typing. Types tell us what programming language constructs exist, whereas refinements express properties of the values of a type. Here we show that refinements are very useful in compiler correctness proofs, wherein it often arises that two expressions that are ...

متن کامل

Mirror Neurons and (Inter)subjectivity: Typological Evidence from East Asian Languages

Language is primarily constituted by action and interaction based on sensorimotor information. This paper demonstrates the nature of subjectivity and intersubjectivity through the neural mechanism and typological evidence of sentence-final particles from East Asian languages and extends to the discussion of the relationship between them. I propose that intersubjecivity is a kind of embedded or ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011